<?php /* Smarty version Smarty-3.1.12, created on 2013-03-24 19:15:19
         compiled from "D:\wamp\www\acps_new\templates\clients\add.tpl" */ ?>
<?php /*%%SmartyHeaderCode:2989250c3aa2747bbd2-35485351%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '4fd7b8c943789004629f3ea80fd1e0c7d5cdf5f4' => 
    array (
      0 => 'D:\\wamp\\www\\acps_new\\templates\\clients\\add.tpl',
      1 => 1363814104,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '2989250c3aa2747bbd2-35485351',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.12',
  'unifunc' => 'content_50c3aa2747cf81_20337446',
  'variables' => 
  array (
    'data' => 0,
    'type' => 0,
    'person' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_50c3aa2747cf81_20337446')) {function content_50c3aa2747cf81_20337446($_smarty_tpl) {?><ul class="subNavig">
    <li><a href="<?php echo $_smarty_tpl->tpl_vars['data']->value['root'];?>
?input=list_of_clients">Clients</a></li>
    <li><a href="<?php echo $_smarty_tpl->tpl_vars['data']->value['root'];?>
?input=list_of_users">Users</a></li>
    <li><a href="<?php echo $_smarty_tpl->tpl_vars['data']->value['root'];?>
?input=list_of_tariffs">Tariffs</a></li>
</ul>
<?php echo $_smarty_tpl->getSubTemplate ($_smarty_tpl->tpl_vars['data']->value['pathToError'], $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

<script type="text/javascript">
    
        
    $(document).ready(function() {
        $(".float").change(function() {
            makeFloat(".float");
        });
    });
    
</script>
<h2 class="pageTitle">Add client</h2>

<form class="adding" action="<?php echo $_smarty_tpl->tpl_vars['data']->value['root'];?>
?input=add_client" method="post" onsubmit="return checkAdd_client(
                                                                    $('#name').val(),
                                                                    $('input:radio[name=client[active]]:checked').val())
                                                                    ">
    <table class="tableForm">
        <tr>
            <td>
                <label for="name">Name <span class="red">*</span> </label>
            </td>
            <td>
                <input name="client[name]" id="name" type="text" />
            </td>
        </tr>
        <tr>
            <td>
                <label for="fullName">Full name<span class="red"></span> </label>
            </td>
            <td>
                <input name="client[fullName]" id="fullName" type="text" size="50" />
            </td>
        </tr>
        <tr>
            <td>
                <label for="ico">ICO<span class="red"></span> </label>
            </td>
            <td>
                <input name="client[ICO]" id="ico" type="text" />
            </td>
        </tr>
        <tr>
            <td>
                <label for="icdph">ICDPH<span class="red"></span> </label>
            </td>
            <td>
                <input name="client[ICDPH]" id="icdph" type="text" />
            </td>
        </tr>
        <tr>
            <td>
                <label for="address">Address<span class="red"></span> </label>
            </td>
            <td>
                <input name="client[address]" id="address" type="text" size="50" />
            </td>
        </tr>
        <tr>
            <td>
                <label for="city">City<span class="red"></span> </label>
            </td>
            <td>
                <input name="client[city]" id="city" type="text" />
            </td>
        </tr>
        <tr>
            <td>
                <label for="zip">ZIP<span class="red"></span> </label>
            </td>
            <td>
                <input name="client[zip]" id="zip" type="text" />
            </td>
        </tr>
        <tr>
            <td>
                <label for="typeOfCooperation">Type of cooperation<span class="red"></span> </label>
            </td>
            <td>
                <select name="client[typeOfCooperation]" size="1" id="typeOfCooperation">
                    <?php  $_smarty_tpl->tpl_vars['type'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['type']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['data']->value['typesOfCoop']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['type']->key => $_smarty_tpl->tpl_vars['type']->value){
$_smarty_tpl->tpl_vars['type']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['type']->key;
?>
                        <option value="<?php echo $_smarty_tpl->tpl_vars['type']->value['id'];?>
"><?php echo $_smarty_tpl->tpl_vars['type']->value['type'];?>
</option>
                    <?php } ?>
                </select>
            </td>
        </tr>
        <tr>
            <td>
                <label for="conditions">Terms<span class="red"></span> </label>
            </td>
            <td>
                <textarea cols="50" rows="8" id="conditions" name="client[conditions]"></textarea>
            </td>
        </tr>
        <tr>
            <td>
                <label for="monthlyPrepaid">Prepaid monthly range<span class="red"></span> </label>
            </td>
            <td>
                <input class="float" name="client[monthlyPrepaid]" id="monthlyPrepaid" type="text" />
            </td>
        </tr>
        <tr>
            <td>
                <label for="monthlyFee">Monthly fee<span class="red"></span> </label>
            </td>
            <td>
                <input class="float" name="client[monthlyFee]" id="monthlyFee" type="text" />
            </td>
        </tr>
        <tr>
            <td>
                <label for="contactPerson">Contact person<span class="red"></span> </label>
            </td>
            <td>
                <select name="client[contactPerson]" size="1" id="contactPerson">
                    <option value="NULL">Please select</option>
                    <?php  $_smarty_tpl->tpl_vars['person'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['person']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['data']->value['contactPersons']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['person']->key => $_smarty_tpl->tpl_vars['person']->value){
$_smarty_tpl->tpl_vars['person']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['person']->key;
?>
                        <option value="<?php echo $_smarty_tpl->tpl_vars['person']->value['users_id'];?>
"><?php echo $_smarty_tpl->tpl_vars['person']->value['surname'];?>
, <?php echo $_smarty_tpl->tpl_vars['person']->value['name'];?>
</option>
                    <?php } ?>
                </select>
            </td>
        </tr>
        <tr>
            <td>
                <label for="ip">IP<span class="red"></span> </label>
            </td>
            <td>
                <input name="client[ip]" type="text" value="" />
            </td>
        </tr>
        <tr>
            <td>
                <label for="active">Active<span class="red">*</span> </label>
            </td>
            <td>
                <input name="client[active]" type="radio" value="0" checked="checked" /> Yes <br/>
                <input name="client[active]" type="radio" value="1" /> No
            </td>
        </tr>
        <tr class="submitRow">
            <td>
                <input name="action" value="add_client" type="hidden" />
            </td>
            <td>
                <input type="submit" value="Add client" name="add_client" /> &nbsp; 
                <span class="red">* Required</span>
            </td>
            <td></td>
        </tr>
    </table>
</form><?php }} ?>